using System;
using System.Collections.Generic;
using System.Text;

namespace Yorrick.FlickrMetadataSynchr.Data
{
   /// <summary>
   /// The metadata to use for syncing a picture on Flickr.
   /// </summary>
   public class FlickrPictureMetadata : PictureMetadata
   {
      #region Private fields
      /// <summary>
      /// The URL of the original (full size) picture on Flickr.
      /// </summary>
      private string _originalUrl;
      #endregion

      #region Constructor
      /// <summary>
      /// Constructs an instance with the Flickr id as identifier.
      /// </summary>
      /// <param name="flickrId">The Flickr id.</param>
      public FlickrPictureMetadata(string flickrId)
         : base(flickrId)
      {
      }
      #endregion

      #region Public properties
      /// <summary>
      /// Gets the Flickr id.
      /// </summary>
      public string FlickrId
      {
         get
         {
            return Id;
         }
      }

      /// <summary>
      /// Gets or sets the URL of the original (full size) picture on Flickr.
      /// </summary>
      public string OriginalUrl
      {
         get
         {
            return _originalUrl;
         }
         set
         {
            _originalUrl = value;
         }
      }
      #endregion

      #region Public methods
      /// <summary>
      /// Returns a copy of the current instance.
      /// </summary>
      /// <returns>A copy of the current instance.</returns>
      /// <remarks>The copy is fully independent.</remarks>
      public FlickrPictureMetadata GetCopy()
      {
         FlickrPictureMetadata copy = new FlickrPictureMetadata(this.Id);

         copy.CopyProperties(this);

         copy.OriginalUrl = this._originalUrl;

         return copy;
      }
      #endregion
   }
}
